<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'MainController@index')->middleware('visit');
Route::get('login/addUser', 'LoginController@addUser')->middleware('visit');
Route::get('.well-known/pki-validation/fileauth.txt', 'MainController@two', function () {
    return '201812030157435ma1nfrvmvgb7egwnqpvw2vhmr23p5h9bbwpx8jzs034wix5l9';
});
Route::prefix('main')->middleware('visit')->group(function () {
    Route::match(['post', 'get'], 'index', 'MainController@index');
});

Route::prefix('article')->group(function () {
    Route::match(['post', 'get'], 'info/{id}', 'ArticleController@ArticleInfo', function ($id) {
    })->middleware('read','visit');
});
Route::prefix('movie')->group(function () {
    Route::match(['post', 'get'], 'index', 'MovieController@index', function ($id) {
    })->middleware('read','visit');
});
Route::prefix('pay')->group(function () {
    Route::match(['get'], 'index', 'PayController@getResult', function () {
    });
    Route::match(['get'], 'test', 'PayController@test', function () {
    });
    Route::match(['get'], 'test_1', 'PayController@test_1', function () {
    });
});
//Route::get('login/{id}', 'LoginController@show');